using UnityEngine;

public class PushBlock_PreasurePlate : MonoBehaviour
{
	[SerializeReference]
	private SpriteRenderer Renderer;

	[SerializeReference]
	private Animator anim;

	[SerializeReference]
	private Sprite HeldDownSprite;

	[SerializeReference]
	private Sprite BlockCompleteSprite;

	public bool Complete;

	private void OnTriggerEnter2D(Collider2D other)
	{
		if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<PushBlock_Pushable>()) && ((Component)other).GetComponent<PushBlock_Pushable>().CanPressPreasurePlates)
		{
			((Component)other).GetComponent<PushBlock_Pushable>().CanPush = false;
			((Behaviour)anim).enabled = false;
			Renderer.sprite = HeldDownSprite;
			((Component)other).GetComponent<SpriteRenderer>().sprite = BlockCompleteSprite;
			Complete = true;
		}
	}
}
